#! /bin/sh
#
# susan       This shell script takes care of starting and stopping
#	       the susan Director daemon
#
# chkconfig: 2345 90 9
# description: Backup Archiving REcovery Open Sourced.
#
#

RETVAL=0
case "$1" in
    start)
       echo "Starting the Susan Director: "
       @sbindir@/susan-dir $2 -c @confdir@/susan-dir.conf
       RETVAL=$?
       echo
       [ $RETVAL -eq 0 ] && touch @subsysdir@/susan-dir
       ;;
    stop)
       echo "Stopping the Director daemon: "
#      killproc @sbindir@/susan-dir
       RETVAL=$?
       echo
       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/susan-dir
       ;;
    restart)
       $0 stop
       sleep 5
       $0 start
       ;;
    *)
       echo "Usage: $0 {start|stop|restart}"
       exit 1
       ;;
esac
exit 0
